conf: annotate ignores better
authorFelix Krull <f_krull@gmx.de>
Wed, 26 Aug 2020 19:44:57 +0000 (21:44 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:56 +0000 (12:53 -0400)
rust-bindings/rust/conf/ostree.toml
rust-bindings/rust/src/auto/functions.rs
rust-bindings/rust/src/auto/versions.txt
rust-bindings/rust/sys/src/auto/versions.txt

index a3fbdfeab21fdd0aa0cb56515f7a84c9667aff01..775e8ee75a06ea773c9ab55c0d93730aa2dac463 100644 (file)
@@ -1,3 +1,8 @@
+# Legend:
+# - [IGNORE] we don't want to autogenerate this
+# - [MANUAL] we have manual wrappers for this, but would prefer to autogenerate it
+# - [FAIL] this is currently disabled because it generates broken code
+
 [options]
 work_mode = "normal"
 library = "OSTree"
@@ -78,7 +83,7 @@ manual = [
     "GLib.Variant",
     "GLib.VariantType",
 
-    # types implemented by hand
+    # [MANUAL] types implemented by hand
     "OSTree.KernelArgs",
     "OSTree.RepoCheckoutAtOptions",
     "OSTree.RepoCheckoutFilter",
@@ -121,12 +126,12 @@ os_tree = "ostree"
 name = "OSTree.CollectionRef"
 status = "generate"
     [[object.function]]
-    # helper functions for NULL-terminated arrays
+    # [IGNORE] helper functions for NULL-terminated arrays
     pattern = "dupv|freev"
     ignore = true
 
     [[object.function]]
-    # clone() should already be this
+    # [IGNORE] clone() should already be this
     name = "dup"
     ignore = true
 
@@ -134,17 +139,17 @@ status = "generate"
 name = "OSTree.Repo"
 status = "generate"
     [[object.function]]
-    # this one generates a guchar** incorrectly
+    # [FAIL] this one generates a guchar** incorrectly
     name = "write_content_async"
     ignore = true
 
     [[object.function]]
-    # these fail because of issues with arrays of dubious lifetimes
+    # [FAIL] these fail because of issues with arrays of dubious lifetimes
     pattern = "find_remotes_async|pull_from_remotes_async"
     ignore = true
 
     [[object.function]]
-    # this is deprecated and supposedly unsafe for GI
+    # [IGNORE] this is deprecated and supposedly unsafe for GI
     name = "checkout_tree_at"
     ignore = true
 
@@ -161,7 +166,7 @@ status = "generate"
 name = "OSTree.RepoFinder"
 status = "generate"
     [[object.function]]
-    # these fail because of issues with arrays of dubious lifetimes
+    # [FAIL] these fail because of issues with arrays of dubious lifetimes/NULL-terminated arrays
     pattern = "resolve_async|resolve_all_async"
     ignore = true
 
@@ -169,12 +174,12 @@ status = "generate"
 name = "OSTree.RepoFinderResult"
 status = "generate"
     [[object.function]]
-    # array helper function
+    # [IGNORE] array helper function
     name = "freev"
     ignore = true
 
     [[object.function]]
-    # clone() should already be this
+    # [IGNORE] clone() should already be this
     name = "dup"
     ignore = true
 
@@ -188,7 +193,7 @@ clear_function_expression = "|_ptr| ()"
 name = "OSTree.SePolicy"
 status = "generate"
     [[object.function]]
-    # has an unused raw pointer parameter so we wrap it by hand
+    # [IGNORE] has an unused raw pointer parameter
     name = "fscreatecon_cleanup"
     ignore = true
 
@@ -196,6 +201,7 @@ status = "generate"
 name = "OSTree.Sign"
 status = "generate"
     [[object.function]]
+    # [IGNORE] these shouldn't be on this type, they belong to subclasses
     pattern = "dummy_.+|ed25519_.+"
     ignore = true
 
@@ -212,21 +218,31 @@ status = "generate"
 name = "OSTree.*"
 status = "generate"
     [[object.function]]
-    # low-level functions with unsafe APIs
-    pattern = "cmp_checksum_bytes|checksum_inplace_from_bytes|checksum_inplace_to_bytes|checksum_b64_inplace_from_bytes|checksum_b64_inplace_to_bytes|hash_object_name"
+    # [MANUAL] probably can't be autogenerated because of the custom Checksum type
+    pattern = "checksum_file|checksum_file_async|checksum_file_at|checksum_file_from_input"
+    ignore = true
+
+    [[object.function]]
+    # [IGNORE] low-level checksum functions, we have a custom checksum API
+    pattern = "cmp_checksum_bytes|checksum_from_bytes|checksum_to_bytes|checksum_inplace_from_bytes|checksum_inplace_to_bytes|checksum_b64_from_bytes|checksum_b64_to_bytes|checksum_b64_inplace_from_bytes|checksum_b64_inplace_to_bytes"
+    ignore = true
+
+    [[object.function]]
+    # [IGNORE] needs custom handling to deal with its raw pointer parameter
+    pattern = "hash_object_name"
     ignore = true
 
     [[object.function]]
-    # private API
+    # [IGNORE] private API
     pattern = "cmd__private__"
     ignore = true
 
     [[object.constant]]
-    # version-dependent constants
+    # [IGNORE] version-dependent constants
     pattern = "VERSION|VERSION_S|YEAR_VERSION|RELEASE_VERSION"
     ignore = true
 
     [[object.constant]]
-    # build-dependent constants
+    # [IGNORE] build-dependent constants
     pattern = "BUILT_FEATURES"
     ignore = true
index e0603115db4bd0de45f78a830ca830ce455084b1..7adfe31526889c22f0c1275379f2af5cd4921d2a 100644 (file)
@@ -33,16 +33,6 @@ pub fn check_version(required_year: u32, required_release: u32) -> bool {
     }
 }
 
-//#[cfg(any(feature = "v2016_8", feature = "dox"))]
-//pub fn checksum_b64_from_bytes(csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32) -> Option<GString> {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_b64_from_bytes() }
-//}
-
-//#[cfg(any(feature = "v2016_8", feature = "dox"))]
-//pub fn checksum_b64_to_bytes(checksum: &str) -> /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_b64_to_bytes() }
-//}
-
 //pub fn checksum_bytes_peek(bytes: &glib::Variant) -> /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
 //    unsafe { TODO: call ostree_sys:ostree_checksum_bytes_peek() }
 //}
@@ -51,43 +41,6 @@ pub fn check_version(required_year: u32, required_release: u32) -> bool {
 //    unsafe { TODO: call ostree_sys:ostree_checksum_bytes_peek_validate() }
 //}
 
-//pub fn checksum_file<P: IsA<gio::File>, Q: IsA<gio::Cancellable>>(f: &P, objtype: ObjectType, out_csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, cancellable: Option<&Q>) -> Result<(), glib::Error> {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_file() }
-//}
-
-//pub fn checksum_file_async<P: IsA<gio::File>, Q: IsA<gio::Cancellable>, R: FnOnce(Result<(), glib::Error>) + 'static>(f: &P, objtype: ObjectType, io_priority: i32, cancellable: Option<&Q>, callback: R) {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_file_async() }
-//}
-
-//#[cfg(any(feature = "v2017_13", feature = "dox"))]
-//pub fn checksum_file_at<P: IsA<gio::Cancellable>>(dfd: i32, path: &str, stbuf: /*Unimplemented*/Option<Fundamental: Pointer>, objtype: ObjectType, flags: ChecksumFlags, out_checksum: &str, cancellable: Option<&P>) -> Result<(), glib::Error> {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_file_at() }
-//}
-
-//pub fn checksum_file_from_input<P: IsA<gio::InputStream>, Q: IsA<gio::Cancellable>>(file_info: &gio::FileInfo, xattrs: Option<&glib::Variant>, in_: Option<&P>, objtype: ObjectType, out_csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, cancellable: Option<&Q>) -> Result<(), glib::Error> {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_file_from_input() }
-//}
-
-//pub fn checksum_from_bytes(csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32) -> Option<GString> {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_from_bytes() }
-//}
-
-pub fn checksum_from_bytes_v(csum_v: &glib::Variant) -> Option<GString> {
-    unsafe {
-        from_glib_full(ostree_sys::ostree_checksum_from_bytes_v(csum_v.to_glib_none().0))
-    }
-}
-
-//pub fn checksum_to_bytes(checksum: &str) -> /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32 {
-//    unsafe { TODO: call ostree_sys:ostree_checksum_to_bytes() }
-//}
-
-pub fn checksum_to_bytes_v(checksum: &str) -> Option<glib::Variant> {
-    unsafe {
-        from_glib_full(ostree_sys::ostree_checksum_to_bytes_v(checksum.to_glib_none().0))
-    }
-}
-
 #[cfg(any(feature = "v2018_2", feature = "dox"))]
 pub fn commit_get_content_checksum(commit_variant: &glib::Variant) -> Option<GString> {
     unsafe {
index b14e7670db7977660e67c6b8b16c996f7b15696a..d08ef3b9ca0f875cec87ab322fad8337f98c659c 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
-from gir-files (https://github.com/gtk-rs/gir-files @ ac0d3c9)
+from gir-files (https://github.com/gtk-rs/gir-files @ 7815425)
index b14e7670db7977660e67c6b8b16c996f7b15696a..d08ef3b9ca0f875cec87ab322fad8337f98c659c 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
-from gir-files (https://github.com/gtk-rs/gir-files @ ac0d3c9)
+from gir-files (https://github.com/gtk-rs/gir-files @ 7815425)